class Solution {
private:
	static bool cmp(string& a, string& b){
		if(a.size() != b.size()){
			return a.size() < b.size();
		}
		for(int i = 0; i < a.size(); i++){
			if(a[i] != b[i])return a[i] < b[i];
		}
		return false;
	} 
public:
    string kthLargestNumber(vector<string>& nums, int k) {
		sort(nums.begin(), nums.end(), cmp);
		return nums[nums.size() - k];
    }
};